package com.tiger.transaction.sample2;

import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;

public class Sample2Client {
	public static void main(String args[]) {
		try {
			InitialContext ctx = new InitialContext();
			Object obj = ctx.lookup("comp/env/ejb/Sample2Bean");
			Sample2Home sample2Home = (Sample2Home) PortableRemoteObject.narrow(obj, Sample2Home.class);
			Sample2 sample2 = sample2Home.create();
			sample2.test1();
			sample2.test2();
			sample2.test3();
			sample2.remove();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
